package com.lu.manage.modular.system.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @Project LuBoot
 * @Author: zhanglu
 * @Date: 2019-11-17 00:46:19
 * @Description: 基础字典
 */
@Data
@Accessors(chain = true)
@TableName("sys_dict")
public class Dict implements Serializable {

    private static final long serialVersionUID = 1L;

    //字典id
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    //所属字典类型的id
    @TableField("dict_type_id")
    private String dictTypeId;

    //字典key
    @TableField("dict_key")
    private String dictKey;

    //字典value
    @TableField("dict_value")
    private String dictValue;

    //字典名称
    @TableField("name")
    private String name;

    //上级代码id
    @TableField("pid")
    private String pid;

    //所有上级id
    @TableField("pids")
    private String pids;

    //状态（字典）
    @TableField("state")
    private Integer state;

    //排序
    @TableField("sort")
    private Integer sort;

    //层级
    @TableField("level")
    private Integer level;

    //字典的描述
    @TableField("description")
    private String description;

    //更新时间
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    //修改人
    @TableField(value = "update_user", fill = FieldFill.INSERT_UPDATE)
    private String updateUser;

    /**
     * 字典类型名称
     */
    @TableField(exist = false)
    private String pname;

}
